<link rel='stylesheet' href='../../static/news/style/style1.css'>
<link rel='stylesheet' href='../../static/news/style/tab.css'>
<link rel='stylesheet' href='../../static/news/style/extra.css'>
<link rel='stylesheet' href='../../static/news/style/sdmenu.css'>
<script charset="utf-8" src="../../static/news/style/common.js"></script>
<script charset="utf-8" src="../../static/news/style/sdmenu.js"></script>
<script src="/static/public/jquery-1.4.3.min.js" type="text/javascript"></script>
<script src="/static/public/page/jquery.pager.js" type="text/javascript"></script>
<link rel="stylesheet" href="/static/public/page/news_pager.css">
{literal}
<script type='text/javascript'>
// <![CDATA[
var myMenu;
window.onload = function() { myMenu = new SDMenu('my_menu'); myMenu.init(); };
// ]]>
</script>
<script type="text/javascript" language="javascript">  
        $(document).ready(function() {  
            $("#pager").pager({ pagenumber:{/literal}{$num.current}, pagecount: {$num.page}{literal}, buttonClickCallback: PageClick });  
           	 $("#chk_all").click(function(){
                 $("input[name='chk_list']").attr("checked",$(this).attr("checked"));
                 
            });
                  });   
            
        PageClick = function(pageclickednumber) {  
            $("#pager").pager({ pagenumber: pageclickednumber, pagecount: {/literal}{$num.page}{literal}, buttonClickCallback: PageClick });  
           // $("#result").html("Clicked Page " + pageclickednumber);     
            	window.location.href='/news/clist/?type=manager&p='+pageclickednumber+'&cid={/literal}{$content.id}{literal}';          
        }    

            function xiugai(cid){
            $("#"+cid).addClass("ed");
            var n=$("#"+cid+"_realname").html();
            var m=$("#"+cid+"_sj").html();
            var a=$("#"+cid+"_amount").html();
            var c=$("#"+cid+"_comment").html();
            $("#comment").val(c);
            $("input[name='amount']").val(a);
            $("input[name='comment_id']").val(cid);
            $("input[name='real_name']").val(n);
            $("input[name='mobile_phone']").val(m);
            
              $("#xiugai").show();
            }

            function savexiugai(){
          	  var id= $("input[name='comment_id']").val();
              var n=$("input[name='real_name']").val();
              var m=$("input[name='mobile_phone']").val();
              var a=$("input[name='amount']").val();
              var c=$("#comment").val();
              
              $.post("/news/savecommentstatus",{id:id,real_name:n,mobile_phone:m,amount:a,comment:c},function(json){
                    if(json.status==true){
                        alert(json.error);
                   	$("#"+id+"_realname").html(n);
                    $("#"+id+"_sj").html(m);
                    $("#"+id+"_amount").html(a); 
                    $("#"+id+"_comment").html(c);         
                     }
               },"json")
            }
            function act(name){

                var arrChk=$("input[name='chk_list']:checked");
              	 var ids='';
              	 var cid=$("select[name='category']").val(); 

           if(name=='search'){
           	window.location.href='/news/listing/?type=manage&cid='+cid;         
       return false;
               }
               
                
                var flag=confirm('确认操作?');
                
                if(flag==false){
                    return false;
                }
                var action;
                if(name=="pass"){
                 action="审核通过";
                }else{
                   action="审核不通过";
                 }

                $(arrChk).each(function(){
            	     ids=ids+','+this.value;  
            	     $("#"+this.value+"_pd").html(action);                      
            	  }); 

              	 $.post("/news/cstatus",{ids:ids,cid:cid,type:name},function(data){
                        alert(data.error);  
                      
                       // window.location.reload();
            	 },"json");
        	   
        	  
             }  

            function recyle(id){  
                 
          	  $.post("/news/savecommentstatus",{id:id,nid:32416},function(json){
                  if(json.status==true){
               	   $("#"+id).fadeOut();
                   }
             },"json")
          } 
            
            
    </script>
    <style>
<!--
.ed td{background-color:#9abcf9}
-->
</style>
{/literal}


<!-- 头部// -->
{include file="news/top.tpl"}

<!-- 左侧// -->
{include file="news/nav.tpl"}
<!-- 中间// -->
<td valign="top" class="td_content"><!-- setting title/desc -->
<form name="news" action="/news/csearch" method="post">

<div class="block titlebox">
<div class="content"><input type="checkbox" name="chk_all" id="chk_all" />全选
<input type=button name=copy class=imgbutton value="通过"
	onclick="act('pass');"> <input type=button name=copy class=imgbutton
	value="不通过" onclick="act('refuse');"> 范围:<select name="fanwei">
	{foreach from=$cate item=l key=key}
	<option value="{$key}" {if $key=="32434"}selected{/if}>{$l}</option>
	{/foreach}
</select>类型:<select name="type">
	<option value="real_name">客户姓名</option>
	<option value="mobile_phone">手机</option>
	<option value="nick_name" selected>操作人</option>
	<option value="theme">军区</option>
	<option value="email">分区</option>
</select><input value="" name="value"> <input type="submit"
	class="imgbutton" value="搜索"> 常用:<a
	href="/news/clist/?cid=0&type=manager">全部</a>{foreach from=$cate item=l
key=key}|<a href="/news/clist/?cid={$key}&type=manager">{$l}</a>
{/foreach}<!--标题:<input value="" name="title"> <input type="submit" class="imgbutton" value="搜索">--></div>
</div>
</form>
<!-- setting title/desc --> <!-- 内容// -->
<table width="100%" align=center cellspacing=0 cellpadding=5 border=0
	class=mytb>
	<tr class=title>
		<th width="5%">序号</th>
		<th width="8%">识别号</th>
		<th width="10%">状态</th>
		<th width="8%">客户姓名</th>
		<th>联系方式</th>
		<th>客户地址</th>
		<th>军区</th>
		<th width="10%">录入时间</th>
		<th>板块</th>
		<th>金额</th>
		<th>操作人</th>
		<th>操作</th>
	</tr>




	{section name=l loop=$news }
	<tr id="{$news[l].id}" {if $smarty.section.l.iteration mod 2==0} class="xz" {/if}>
		<td class=left>{$smarty.section.l.iteration}</td>
		<td class=left style="text-align: left;"><input type=checkbox
			name=chk_list value="{$news[l].id}">{$news[l].id}</td>
		<td class="right" id="{$news[l].id}_pd">{if $news[l].status=="未审核"}<img src="/static/news/common/clock.gif" title="等待审核">{elseif $news[l].status=="审核通过"}<img src="/static/news/common/check_right.gif">{else}<img src="/static/news/common/check_error.gif">{/if}</td>
		<td class=left id="{$news[l].id}_realname">{$news[l].real_name}</td>
		<td class=left><a
			href="javascript:void(0);" onclick="xiugai({$news[l].id})"><img
			src="/static/news/images/xiugai.png" title="编辑" alt="编辑"></img></a><span id="{$news[l].id}_sj">{$news[l].mobile_phone}</span></td>
		<td class="right">{$news[l].dizhi}</td>
		<td class=right><a href="/news/v/?id={$news[l].nid}" target="__blank"><span id="{$news[l].id}_comment">{$news[l].theme}{$news[l].email}</span></a></td>
		<td class=left>{$news[l].date|date_format:"%m/%d %H:%M"}</td>

		<td class=right><a href="/news/clist/?type=manager&cid={$news[l].nid}">{$news[l].title}</a></td>
		<td class=left id="{$news[l].id}_amount">{$news[l].amount}</td>
		<td class="right">{$news[l].nick_name}</td>

		<td class=left><img src="/static/news/images/recyle.png" title="回收站"
			onclick="recyle({$news[l].id})"></img></td>

	</tr>
	{/section}

</table>


<!-- help -->
<div style="width: 100%; height: 30px; padding-left: 25%;">
<div id="pager"></div>
<div style="float:left:height:18px;width:200px;margin-left:400px;margin-top:-5px;">共有<font color="red">{$totalnum}</font>条记录(不做参考)</div></div>
<!-- help --></td>



<!-- 底部// -->
{include file="news/footer.tpl"}

